Optimal. Leaf size=251 \[ -\frac {2 a b \left (a^2 (2 A+3 C)+b^2 (11 A-6 C)\right ) \tan (c+d x)}{3 d}+\frac {b^2 \left (C \left (12 a^2+b^2\right )+2 A b^2\right ) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {\left (a^2 (2 A+3 C)+6 A b^2\right ) \sin (c+d x) (a+b \sec (c+d x))^2}{3 d}-\frac {b^2 \left (a^2 (4 A+6 C)+3 b^2 (6 A-C)\right ) \tan (c+d x) \sec (c+d x)}{6 d}+2 a b x \left (a^2 (A+2 C)+2 A b^2\right )+\frac {A \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^4}{3 d}+\frac {2 A b \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))^3}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.75, antiderivative size = 251, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {4095, 4094, 4048, 3770, 3767, 8} \[ -\frac {2 a b \left (a^2 (2 A+3 C)+b^2 (11 A-6 C)\right ) \tan (c+d x)}{3 d}+\frac {b^2 \left (C \left (12 a^2+b^2\right )+2 A b^2\right ) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {\left (a^2 (2 A+3 C)+6 A b^2\right ) \sin (c+d x) (a+b \sec (c+d x))^2}{3 d}-\frac {b^2 \left (a^2 (4 A+6 C)+3 b^2 (6 A-C)\right ) \tan (c+d x) \sec (c+d x)}{6 d}+2 a b x \left (a^2 (A+2 C)+2 A b^2\right )+\frac {A \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^4}{3 d}+\frac {2 A b \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))^3}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3767
Rule 3770
Rule 4048
Rule 4094
Rule 4095
Rubi steps
\begin {align*} \int \cos ^3(c+d x) (a+b \sec (c+d x))^4 \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac {A \cos ^2(c+d x) (a+b \sec (c+d x))^4 \sin (c+d x)}{3 d}+\frac {1}{3} \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \left (4 A b+a (2 A+3 C) \sec (c+d x)-b (2 A-3 C) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {2 A b \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {A \cos ^2(c+d x) (a+b \sec (c+d x))^4 \sin (c+d x)}{3 d}+\frac {1}{6} \int \cos (c+d x) (a+b \sec (c+d x))^2 \left (2 \left (6 A b^2+\frac {1}{2} a^2 (4 A+6 C)\right )+4 a b (A+3 C) \sec (c+d x)-6 b^2 (2 A-C) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {\left (6 A b^2+a^2 (2 A+3 C)\right ) (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d}+\frac {2 A b \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {A \cos ^2(c+d x) (a+b \sec (c+d x))^4 \sin (c+d x)}{3 d}+\frac {1}{6} \int (a+b \sec (c+d x)) \left (12 b \left (2 A b^2+a^2 (A+2 C)\right )-2 a b^2 (4 A-9 C) \sec (c+d x)-2 b \left (3 b^2 (6 A-C)+a^2 (4 A+6 C)\right ) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {\left (6 A b^2+a^2 (2 A+3 C)\right ) (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d}+\frac {2 A b \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {A \cos ^2(c+d x) (a+b \sec (c+d x))^4 \sin (c+d x)}{3 d}-\frac {b^2 \left (3 b^2 (6 A-C)+a^2 (4 A+6 C)\right ) \sec (c+d x) \tan (c+d x)}{6 d}+\frac {1}{12} \int \left (24 a b \left (2 A b^2+a^2 (A+2 C)\right )+6 b^2 \left (2 A b^2+\left (12 a^2+b^2\right ) C\right ) \sec (c+d x)-8 a b \left (b^2 (11 A-6 C)+a^2 (2 A+3 C)\right ) \sec ^2(c+d x)\right ) \, dx\\ &=2 a b \left (2 A b^2+a^2 (A+2 C)\right ) x+\frac {\left (6 A b^2+a^2 (2 A+3 C)\right ) (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d}+\frac {2 A b \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {A \cos ^2(c+d x) (a+b \sec (c+d x))^4 \sin (c+d x)}{3 d}-\frac {b^2 \left (3 b^2 (6 A-C)+a^2 (4 A+6 C)\right ) \sec (c+d x) \tan (c+d x)}{6 d}+\frac {1}{2} \left (b^2 \left (2 A b^2+\left (12 a^2+b^2\right ) C\right )\right ) \int \sec (c+d x) \, dx-\frac {1}{3} \left (2 a b \left (b^2 (11 A-6 C)+a^2 (2 A+3 C)\right )\right ) \int \sec ^2(c+d x) \, dx\\ &=2 a b \left (2 A b^2+a^2 (A+2 C)\right ) x+\frac {b^2 \left (2 A b^2+\left (12 a^2+b^2\right ) C\right ) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {\left (6 A b^2+a^2 (2 A+3 C)\right ) (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d}+\frac {2 A b \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {A \cos ^2(c+d x) (a+b \sec (c+d x))^4 \sin (c+d x)}{3 d}-\frac {b^2 \left (3 b^2 (6 A-C)+a^2 (4 A+6 C)\right ) \sec (c+d x) \tan (c+d x)}{6 d}+\frac {\left (2 a b \left (b^2 (11 A-6 C)+a^2 (2 A+3 C)\right )\right ) \operatorname {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{3 d}\\ &=2 a b \left (2 A b^2+a^2 (A+2 C)\right ) x+\frac {b^2 \left (2 A b^2+\left (12 a^2+b^2\right ) C\right ) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {\left (6 A b^2+a^2 (2 A+3 C)\right ) (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d}+\frac {2 A b \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {A \cos ^2(c+d x) (a+b \sec (c+d x))^4 \sin (c+d x)}{3 d}-\frac {2 a b \left (b^2 (11 A-6 C)+a^2 (2 A+3 C)\right ) \tan (c+d x)}{3 d}-\frac {b^2 \left (3 b^2 (6 A-C)+a^2 (4 A+6 C)\right ) \sec (c+d x) \tan (c+d x)}{6 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 3.09, size = 324, normalized size = 1.29 \[ \frac {a^4 A \sin (3 (c+d x))+12 a^3 A b \sin (2 (c+d x))+24 a b (c+d x) \left (a^2 (A+2 C)+2 A b^2\right )+3 a^2 \left (a^2 (3 A+4 C)+24 A b^2\right ) \sin (c+d x)-6 b^2 \left (C \left (12 a^2+b^2\right )+2 A b^2\right ) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+6 b^2 \left (C \left (12 a^2+b^2\right )+2 A b^2\right ) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )+\frac {48 a b^3 C \sin \left (\frac {1}{2} (c+d x)\right )}{\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )}+\frac {48 a b^3 C \sin \left (\frac {1}{2} (c+d x)\right )}{\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )}+\frac {3 b^4 C}{\left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}-\frac {3 b^4 C}{\left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )^2}}{12 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 210, normalized size = 0.84 \[ \frac {24 \, {\left ({\left (A + 2 \, C\right )} a^{3} b + 2 \, A a b^{3}\right )} d x \cos \left (d x + c\right )^{2} + 3 \, {\left (12 \, C a^{2} b^{2} + {\left (2 \, A + C\right )} b^{4}\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (12 \, C a^{2} b^{2} + {\left (2 \, A + C\right )} b^{4}\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (2 \, A a^{4} \cos \left (d x + c\right )^{4} + 12 \, A a^{3} b \cos \left (d x + c\right )^{3} + 24 \, C a b^{3} \cos \left (d x + c\right ) + 3 \, C b^{4} + 2 \, {\left ({\left (2 \, A + 3 \, C\right )} a^{4} + 18 \, A a^{2} b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{12 \, d \cos \left (d x + c\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.33, size = 398, normalized size = 1.59 \[ \frac {12 \, {\left (A a^{3} b + 2 \, C a^{3} b + 2 \, A a b^{3}\right )} {\left (d x + c\right )} + 3 \, {\left (12 \, C a^{2} b^{2} + 2 \, A b^{4} + C b^{4}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, {\left (12 \, C a^{2} b^{2} + 2 \, A b^{4} + C b^{4}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {6 \, {\left (8 \, C a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - C b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 8 \, C a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - C b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2}} + \frac {4 \, {\left (3 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 6 \, A a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 18 \, A a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 2 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 36 \, A a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, A a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 18 \, A a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.48, size = 259, normalized size = 1.03 \[ \frac {A \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right ) a^{4}}{3 d}+\frac {2 A \,a^{4} \sin \left (d x +c \right )}{3 d}+\frac {a^{4} C \sin \left (d x +c \right )}{d}+\frac {2 A \,a^{3} b \sin \left (d x +c \right ) \cos \left (d x +c \right )}{d}+2 a^{3} A b x +\frac {2 A \,a^{3} b c}{d}+4 a^{3} b C x +\frac {4 C \,a^{3} b c}{d}+\frac {6 A \,a^{2} b^{2} \sin \left (d x +c \right )}{d}+\frac {6 C \,a^{2} b^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+4 A a \,b^{3} x +\frac {4 A a \,b^{3} c}{d}+\frac {4 C a \,b^{3} \tan \left (d x +c \right )}{d}+\frac {A \,b^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {C \,b^{4} \sec \left (d x +c \right ) \tan \left (d x +c \right )}{2 d}+\frac {C \,b^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 221, normalized size = 0.88 \[ -\frac {4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a^{4} - 12 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{3} b - 48 \, {\left (d x + c\right )} C a^{3} b - 48 \, {\left (d x + c\right )} A a b^{3} + 3 \, C b^{4} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 36 \, C a^{2} b^{2} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 6 \, A b^{4} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 12 \, C a^{4} \sin \left (d x + c\right ) - 72 \, A a^{2} b^{2} \sin \left (d x + c\right ) - 48 \, C a b^{3} \tan \left (d x + c\right )}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.71, size = 2660, normalized size = 10.60 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________